Skip to content

Disallow creating Stripe payments on the admin panel#168

Merged
waiting-for-dev merged 1 commit into
masterfrom
waiting-for-dev/disable_payment_from_backend
Feb 13, 2023
Merged

Disallow creating Stripe payments on the admin panel#168
waiting-for-dev merged 1 commit into
masterfrom
waiting-for-dev/disable_payment_from_backend

Conversation

@waiting-for-dev

@waiting-for-dev waiting-for-dev commented Feb 10, 2023

Copy link
Copy Markdown
Contributor

Summary

We don't want to have that feature on the initial release, but we might add it at a later stage.

Closes #165

screenshot-localhost_3000-2023 02 10-08_15_34

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

We don't want to have that feature on the initial release, but we might
add it at a later stage.

Closes #165

@elia elia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 Nice and simple!

@kennyadsl

Copy link
Copy Markdown
Member

Does this allow the admin to perform other operations like refund and capturing?

@kennyadsl

Copy link
Copy Markdown
Member

Needs further exploration, but I don't think this will work because in the fire action as well. I think that action is responsible for voiding and capturing, and it uses the load_data filter to get the @payment, which will filter out stripe.

Something similar is done in the API.

@waiting-for-dev

waiting-for-dev commented Feb 13, 2023

Copy link
Copy Markdown
Contributor Author

Good call, @kennyadsl. Apparently, it looks like that's possible. Please, see the video below:

stripe_admin.webm

Not shown in the video, but editing and voiding also worked.

The #load_data method will only use the scoped payment methods when there's no selected payment.

@kennyadsl

Copy link
Copy Markdown
Member

Ah, good to know! So "available to X" really means "available for creation to". 👍

@kennyadsl kennyadsl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@waiting-for-dev waiting-for-dev merged commit df993a4 into master Feb 13, 2023
@waiting-for-dev waiting-for-dev deleted the waiting-for-dev/disable_payment_from_backend branch February 13, 2023 08:34
@elia elia added this to the v5 milestone Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable making payments from solidus_backend

3 participants